<template>
    <div class="container">
      <h1>这是商家菜单页面</h1>
      <div>{{ qrCodeData }}</div>
    <ul v-for="item in items">
      <li>
        <div>{{ item.itemName }}</div>
        <div>{{ item.price }}</div>
      </li>
    </ul>
    </div>

 

  </template>
  <script>
import { affixProps } from 'element-plus';
import axios from 'axios';


  export default {

    
    data() {
      return {
        qrCodeData: this.$route.params,
        items: []
      };
    },
    name: 'RestaurantDetail',
    components: {

    },
    methods: {

    },
    async mounted(){
      axios.get('http://localhost:8999/accountManage/menu')
      .then(response => {
        console.log('数据获取成功:', response);
        this.items=response.data.data
      })
      .catch(error => {
        console.error('获取数据失败:', error);
      });
    }
  }
  
  </script>
  
  <style>
  .demo-collapse{
    display: flex;
    width: 100%;
    flex-direction: column;
  }
    .container {
    /* background-image: url("../public/assets/a.jpg"); */
  
    background-color: rgba(138, 203, 250, 0.8);
    height:100%;
  
    margin: 0;
    padding: 0;
    display: flex;
    align-items:center;
    width: 100%;
    flex-direction: column;
  }
  </style>